package exercise;

public class exercise_3 {
	public static void main(String[] args) {
		double[] doubleArr= {3456.88,124.33,7768.2};
		for(int i =0 ;i<doubleArr.length;i++) {
			StringBuffer str = new StringBuffer(Double.toString(doubleArr[i]));
			int dotIndex = str.indexOf(".");
			for(int j=dotIndex-3;j>0;j=j-3) { 
				str.insert(j, ",");
				System.out.println(str);
			}
		}
		

	}
}
